import requests

# 需要请求的目标地址
url = 'http://www.rrys2019.com/user/user'
# 登录请求的地址
urlLogin = 'http://www.rrys2019.com/User/Login/ajaxLogin'

# 请求头
headers = {
    'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.129 Safari/537.36'
}
data = {
    'account': 'claybyl',
    'password': '123Woshib!',
    'remember': '1',
    'url_back': 'http: // www.rrys2019.com /'
}
req = requests.session()
res=req.post(url=urlLogin, data=data, headers=headers)

status_code=res.status_code
if status_code==200:
    res=req.get(url=url,headers=headers)
    with open('rr.html','w',encoding='utf-8') as fp:
        fp.write(res.text)